home *** CD-ROM | disk | FTP | other *** search
- #include "Hook_Utility.h"
-
- static APTR __saveds __asm Function_Hook(register __a0 struct Hook *hook,
- register __a2 APTR object,
- register __a1 APTR message)
- {
- return(((proto_c_function)hook->h_SubEntry)(hook,object,message));
- }
-
- void InstallHook(struct Hook *hook, proto_c_function c_function, APTR Data)
- {
- struct MinNode null_node = {NULL,NULL};
-
- hook->h_MinNode = null_node;
- hook->h_Entry = (ULONG (*)()) Function_Hook;
- hook->h_SubEntry = (ULONG (*)())c_function;
- hook->h_Data = Data;
- }